public class ComponentLeaf extends Component{
    public ComponentLeaf(String cpmponentName) {
        super(cpmponentName);
    }

    @Override
    public boolean addChild(Component child) {
        return false;
    }

    @Override
    public boolean removeChild(Component child) {
        return false;
    }

    @Override
    public Component getChild(int childIndex) {
        return null;
    }

    @Override
    public void operation() {
        System.out.println("叶子结点："+getCpmponentName());

    }
}
